class PetInfoEntity {
	int code;
	PetInfoData data;

	PetInfoEntity({this.code, this.data});

	PetInfoEntity.fromJson(Map<String, dynamic> json) {
		code = json['code'];
		data = json['data'] != null ? new PetInfoData.fromJson(json['data']) : null;
	}

	Map<String, dynamic> toJson() {
		final Map<String, dynamic> data = new Map<String, dynamic>();
		data['code'] = this.code;
		if (this.data != null) {
      data['data'] = this.data.toJson();
    }
		return data;
	}
}

class PetInfoData {
	String birthday;
	String categoryName;
	int deviceId;
	int sex;
	int weight;
	String ifid;
	String nick;
	String loveName;
	int loveId;
	bool bindStatus;
	int animalId;
	String header;
	String bindMsg;
	PetInfoDataAge age;

	PetInfoData({this.birthday, this.categoryName, this.deviceId, this.sex, this.weight, this.ifid, this.nick, this.loveName, this.loveId, this.bindStatus, this.animalId, this.header, this.bindMsg, this.age});

	PetInfoData.fromJson(Map<String, dynamic> json) {
		birthday = json['birthday'];
		categoryName = json['category_name'];
		deviceId = json['device_id'];
		sex = json['sex'];
		weight = json['weight'];
		ifid = json['ifid'];
		nick = json['nick'];
		loveName = json['love_name'];
		loveId = json['love_id'];
		bindStatus = json['bind_status'];
		animalId = json['animal_id'];
		header = json['header'];
		bindMsg = json['bind_msg'];
		age = json['age'] != null ? new PetInfoDataAge.fromJson(json['age']) : null;
	}

	Map<String, dynamic> toJson() {
		final Map<String, dynamic> data = new Map<String, dynamic>();
		data['birthday'] = this.birthday;
		data['category_name'] = this.categoryName;
		data['device_id'] = this.deviceId;
		data['sex'] = this.sex;
		data['weight'] = this.weight;
		data['ifid'] = this.ifid;
		data['nick'] = this.nick;
		data['love_name'] = this.loveName;
		data['love_id'] = this.loveId;
		data['bind_status'] = this.bindStatus;
		data['animal_id'] = this.animalId;
		data['header'] = this.header;
		data['bind_msg'] = this.bindMsg;
		if (this.age != null) {
      data['age'] = this.age.toJson();
    }
		return data;
	}
}

class PetInfoDataAge {
	int month;
	int year;
	int notBirth;
	int day;

	PetInfoDataAge({this.month, this.year, this.notBirth, this.day});

	PetInfoDataAge.fromJson(Map<String, dynamic> json) {
		month = json['month'];
		year = json['year'];
		notBirth = json['not_birth'];
		day = json['day'];
	}

	Map<String, dynamic> toJson() {
		final Map<String, dynamic> data = new Map<String, dynamic>();
		data['month'] = this.month;
		data['year'] = this.year;
		data['not_birth'] = this.notBirth;
		data['day'] = this.day;
		return data;
	}
}
